package org.qydjk.common.util.hibernate;


import org.hibernate.dialect.MySQL5InnoDBDialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;
import org.hibernate.type.StandardBasicTypes;

/**
 * 自定义数据库方言
 */
public class MyLocalDialect extends MySQL5InnoDBDialect {
    public MyLocalDialect() {
        super();
        registerFunction("getDistance", new SQLFunctionTemplate(StandardBasicTypes.DOUBLE, "getDistance(?1,?2,?3,?4)"));
    }
}
